getSongsByQuery

Returns a list of matching songs from the library based on the specified search criteria.

Sample Request

<mmRequest command="getSongsByQuery" station="ID" [version="1"] [client=""] [userData=""]>
	<contents>
		<query>
			[<categories>
				<category [id="1"] [code="A"]/>
			</categories>]
			[<filters>
				<filter [type="fieldId|fieldName"] target="Title" operator="contains" value="love"/>
			</filters>]
			[<sortKeys>
				<sortKey [type="fieldId|fieldName"] target="Artist" order="asc|desc"/>
			</sortKeys>]
			[<properties>
				<property name="propname">value</property>
			</properties>]
		</query>
		[<fields>
			<field id="101" />
			<field name="Title" />
		</fields>]
	</contents>
</mmRequest>

Request Notes

query - The actual search request is provided in the contents/query section. All sections and tags are optional. You only need to include the portions necessary to define the desired search query. See Appendix B - Nexus Library Query Tags for complete details of the Nexus query tags.

 

fields - The fields section must contain one field tag for each song field you wish to include in the reply message. You can use the id attribute with the internal field ID codes, or a name attribute with the user-specified field name. Only the specified fields will be returned for each song. However, the internal song ID number will always be included in the reply. You can obtain a list of available fields with the command. See Appendix C - Song Field Request Options for addition options that can be used with your fields specification.

 

Note that the fields section is optional. If not specified, only the song id, runtime and the primary and secondary fields will be returned. Typically, primary and secondary fields are defined as title and artist.

Sample Reply

<mmReply command="getSongsByQuery" station="ID" version="1" [userData=""] status="ok">
	<contents>
		<songList recordCount="1">
			<song songId="1">
				<field id="100" name="Description">Beatles / Yesterday</field>
				<field id="101" name="Artist">Beatles</field>
			</song>
		</songList>
	</content>
</mmReply>

Reply Notes

The list of songs is returned in the contents/songlist section. Each song has a song tag. The songid attribute contains the MusicMaster internal song ID for each song. One or more field tags may be included with the value of each requested field. The field tags include an id attribute with the internal field ID number and a name attribute with the user defined field name.

Compatibility and Version Info

Available in all versions